package com.rd.student.jiaji.class3.wangyanbo.day0731;

public class Test3 {
    public static void main(String[] args) {
        int[] a=new int[50];
        int[] b=new int[20];
        for (int i = 0; i < 50; i++) {
            a[i]=i;
        }
        for (int i = 0; i < 20; i++) {
            boolean l=false;
            int index=(int)(Math.random()*50);
            for (int s = 0; s < i; s++) {
                if(index==b[s]){
                    l=true;
                    i--;
                    break;
                }
            }
            if (l==true){continue;}
            System.out.print((b[i]=index) + "  ");
        }


    }
}
